﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;

namespace Electronic_work_order.Model
{
    //员工表
    public class Users
    {
        [Key]
        //     员工ID
        public int UsersID { get; set; }
        //员工名称
        public string UsersName { get; set; }
        //员工密码
        public string UsersPwd { get; set; }
        //员工性别
        public string UsersSex { get; set; }
        //员工电话
        public string UsersPhone { get; set; }
        //员工邮箱
        public string UsersEmail { get; set; }

        
        //员工在哪个部门ID（组织ID）
        public int OrganizationID { get; set; }
        [ForeignKey("OrganizationID")]
        public virtual Organization  Organization { get; set; }

      
        //员工角色（外键）RoleID
        public int RoleID { get; set; }
        [ForeignKey("RoleID")]
        public virtual UserRole UserRole { get; set; }

        //员工入职时间
        public DateTime EntryTime { get; set; }
        //员工离职时间
        public string QuitTime { get; set; }

     
        //状态ID
        public int StateID { get; set; }
        [ForeignKey("StateID")]
        public virtual UserState  UserState { get; set; }

        //Remarks Varchar(100)
        public string Remarks { get; set; }

    }
}
